var webpage = require('webpage');
var page = webpage.create();

// 设置尺寸为iPhone6的尺寸
page.viewportSize = { 
    width: 375,
    height: 667
};

page.open('http://localhost:8080/#/', function (status) {
    if (status === 'fail') {
        console.log('open page fail!');
    } else {
        page.render('screenshot_'+new Date().getTime()+'.png');
    }
    phantom.exit();
});